package com.example.qxfw.nyqx.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.qxfw.common.entity.yj.ZhqhYz;
import com.example.qxfw.nyqx.mapper.ZhqhYzMapper;
import com.example.qxfw.nyqx.service.ZhqhYzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZhqhYzServiceImpl implements ZhqhYzService {

    @Autowired
    private ZhqhYzMapper zhqhYzMapper;

    @Override
    public List<ZhqhYz> getList(String factorIndex) {
        return zhqhYzMapper.selectList(factorIndex);
    }

    @Override
    public Integer update(ZhqhYz zhqhYz) {
        return zhqhYzMapper.update(zhqhYz, Wrappers.<ZhqhYz>lambdaUpdate().eq(ZhqhYz::getFactorindex,zhqhYz.getFactorindex()));
    }
}
